package com.kgc.ebook.ebookmanager.controller;

import com.kgc.ebook.ebookmanager.pojo.Ebookcategory;
import com.kgc.ebook.ebookmanager.pojo.Ebookentry;
import com.kgc.ebook.ebookmanager.pojo.ResultEntity;
import com.kgc.ebook.ebookmanager.service.EbookcategoryService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class categoryController {
    @Resource
    EbookcategoryService ebookcategoryService;
    @RequestMapping("/getCategoryList")
    public ResultEntity<List<Ebookcategory>>  getCategoryList(){
List<Ebookcategory> ebookcategoryList=ebookcategoryService.selectAll();
return  ResultEntity.successWithoutData(ebookcategoryList);
    }



}
